using KrasDD.Models;
using KrasDD.Services.Interfaces;

namespace KrasDD.Services.Implementations
{
    public class ItemtypeService : BaseService<ITEMTYPE>, IItemtypeService
    {
        public ItemtypeService(IFreeSql freeSql, IServiceProvider serviceProvider) : base(freeSql, serviceProvider)
        {
        }

        public async Task<List<PROPERTY>> GetPropertiesAsync(string itemtypeId)
        {
            return await _freeSql.Select<PROPERTY>()
                .Where(x => x.SOURCE_ID == itemtypeId)
                .ToListAsync();
        }
    }
}
